import { Controller, Post, UploadedFile, UseInterceptors } from '@nestjs/common';
import { FileInterceptor } from '@nestjs/platform-express';
import { parse } from "node-xlsx"
@Controller('media')
export class MediaController {


    @Post("xlsx2data")
    @UseInterceptors(FileInterceptor("file"))
    xlsx2data(
        @UploadedFile("file") file: Express.Multer.File,
    ) {
        const res = parse(file.buffer)
        return res;
    }
}
